﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员注册_Swoole开发框架官方网站</title>
<link href="/static/css/base.css" rel="stylesheet" type="text/css">
<link href="/static/css/grid.css" rel="stylesheet" type="text/css">
<meta name="Copyright" content="Swoole.com" />
<meta name="description" content="注册为Swoole社区会员" />
<meta name="keywords" content="PHP,Web,PHP社区,PHP程序员,PHP高级,Go语言,Python语言,Golang" />
<SCRIPT  language="JavaScript" src="/static/js/jquery.js" type=text/javascript></SCRIPT>
<SCRIPT  language="JavaScript" src="/static/js/SwooleUI.js" type=text/javascript></SCRIPT>
<SCRIPT  language="JavaScript" src="/static/js/validator.js" type=text/javascript></SCRIPT>
<SCRIPT  language="JavaScript" src="/static/js/main.js" type=text/javascript></SCRIPT>
<style>
.skill label{width:140px; float:left}
</style>
</head>

<body>
{{include file='header.html}}
<script language="javascript">
window.onload = function(){
	validator('form1');
	validator_each('form1');
	checklogin();
};
error_handle = function(o,msg){
	var msg_o = document.getElementById(o.name+'_msg');
	if(msg_o==null) return false;
	msg_o.innerHTML = '<img src="/static/images/false.png" border="0" />' + msg;
	o.style.backgroundColor = '#ffcccc';	
	document.getElementById('submit1').disabled = true;	
}
right_handle = function(o){
	var msg_o = document.getElementById(o.name+'_msg');
	if(msg_o==null) return false;
	msg_o.innerHTML = '<img src="/static/images/true.png" border="0" />';
	o.style.backgroundColor = '#fff';
	var btn = document.getElementById('submit1');
	if(btn) btn.disabled = false;
}
function check_email(o)
{	
	var s = jQuery.getJSON('/ajax/check_email/',{'email':o.value,'random':Math.random()},function(data){
		if(data) error_handle(o,'此邮箱已注册！');
		else right_handle(o)});
}
</script>

<div class="areamap">
<a href="{{$smarty.const.WEBROOT}}/" target="_parent">首页</a> > 会员注册</div>

<form method="post" id="form1">
<div class="mainreg">
<h2>会员注册</h2>
<p>以下标<span class="red">*</span>号的是必须填写的内容</p>
<table width="98%" border="0">
  <tr>
    <td width="100" height="36"><strong>电子邮箱<span class="red">*</span>：</strong></td>
    <td height="36"><input type="text" size="30" value="" class="inputlen" name="email" id="email" empty="请您填写邮箱！" ctype='email|邮箱格式不对' ajax='check_email' />
    <span id='email_msg'></span></td>
    </tr>
  <tr>
    <td width="100" height="36"><strong>
      <label>昵称<span class="red">*</span>：</label>
    </strong></td>
    <td height="36"><input type="text" size="30" value="" class="inputlen" name="nickname" id="nickname" empty="请您填写昵称！" ctype='nickname|昵称只允许输入汉字和英文' />
    <span id='nickname_msg'></span></td>
    </tr>
  <tr>
    <td width="100" height="36"><strong>性别
      <label><span class="red">*</span>：</label>
    </strong></td>
    <td height="36">{{$forms.sex}}</td>
    </tr>
  <tr>
    <td width="100" height="36"><strong>登陆密码<span class="red">*</span>：</strong></td>
    <td height="36"><input type="password" size="30" value="" class="inputlen" name="password" id="password" empty="请您填写登录密码！" /><span id='password_msg'></span></td>
  </tr>
  <tr>
    <td width="100" height="36"><strong>确认密码<span class="red">*</span>：</strong></td>
    <td height="36"><input type="password" size="30" value="" class="inputlen" name="repassword" id="repassword" empty="请您再输入一次！" equalo='password|前后输入的密码不一致！' /><span id='repassword_msg'></span></td>
    </tr>
  <tr>
    <td width="100" height="36"><strong>验证码<span class="red">*</span>：</strong></td>
    <td height="36"><input type="text" size="12" value="" class="inputlen" name="authcode" id="authcode"  empty="请您输入验证码！" />
      <span><img src="/page/verify/" align="absmiddle" class="" /><span id='authcode_msg'></span></span></td>
    </tr>
  <tr>
    <td width="100" height="36">&nbsp;</td>
    <td height="36"><span class="regbutton">
      <input value="确认并注册" type="submit" id='submit1' />
    </span></td>
    </tr>
</table>
</div>
</form>
{{include file='footer.html}}